package com.cgah

/**
 * Created by IntelliJ IDEA.
 * User: chue
 * Date: 4/17/11
 * Time: 5:19 PM
 * To change this template use File | Settings | File Templates.
 */
/**
 * Oh the pain!
 */
class BidJsonResponse {

    Date dateTime = null
    Float amount;
    String username;
    Long id;
    String dateTimeString;
    Float nextMinBid;

    BidJsonResponse(Long id, Float amount, Float nextMinBid, Date dateTime, String username) {
        this.id = id == null ? 0l : id;
        this.amount =  amount == null ? 0.0f : amount;
        this.nextMinBid =  nextMinBid == null ? 0.0f : nextMinBid;
        this.dateTime = dateTime == null ? new Date() : dateTime;
        this.username = username == null ? "" : username;
        this.dateTimeString = DateNumberFormatter.formatDate(dateTime);
    }

}